Some structural changes.

- Using require.js now
- Cleaned up some code.
- Removed unused files.