Made some code refactoring; Now using application singleton for DB connection.