Some improvements on the code and structure

* Code style, spaces and other improvements
* All tests passing
* Bin cleaning
* test/case dir was created to maintain files for cases isolated
Single var declaration per scope. Preference is to declare them first and then use later (JS will do this anyway)