Cleanup and apply js module pattern
Whitespace