Code clean up, JSHint and rename to main.js