Move functionality into separate files
Tidy up whitespace and missing/unnecary semicolons
Move modules into separate directories :metal: