major refactoring. added configuration. removed entities. created models. begining of tests.