Make Model classes singletons and implement the database class