Refactor init into models
Write config as json
Add test for user model
Add ci config