Updated the models and encapsulated them in modules