removed dependency on require.js
merged all files into main.js, and fixed several syntax errors