introduced config files. added tests for persistence models. refactoring