Fixed and refactoring model classes