Feature/restructure

Tasks:

 - [x] Move all models into separate files
 - [ ] Remove use of module globals
 - [x] Move view logic out