code cleanup
Merge pull request #3 from andreabalducci/jsloop

code cleanup