Refactored all entities and the db handler class, a huge work :D,