modularising into mvc - work in progress

- [x] move model into own file