updated modules, refactoring orm and model