Revert "Refactoring"

This reverts commit da3daea4ba630a4430e467930916181152a57c7c.
Revert "Making JSlint to shut up"

This reverts commit 45044fa0a207fe6277abb9751c70202363bc0a94.