several improvements
improve class manipulation to support space-separated classes
forEach -> each
fix small bugs + add 'manipulation' spec