Prevent collisions in multiple requests - fix #5
Corrected some JS formatting