When a motor surges up and down on its own it's usally the indication of
a vacuum leak. If you had the throttle housing off to clean it be sure
that it is refastened securely. If the bellows hose to the intake is not
split and the intake manifold gasket is intact everywhere front to rear,
and the hoses on the idle air control motor are secure, then the mass
airflow sensor is indeed faulty.
Bob