Separate routes and models

Closes #76
Closes #80