refactored db and models to modularize code and make it testable. Unit tests now passing
adjusted the deployer.js to use reactored code