Refactored code and changed db name