implement model builder. add tests
fix loader
Merge branch 'feature/build_model' into develop