Corrected qMax computation
Added cleanupFrame function for background noise suppression.