Fixed JSHint warnings & require.js bug