Splitting into separate files

- Classes are now divided into individual files.
- Fixed some JSHint issues.