Moved model-related classes to new file