separate model classes from database