Change model back to case classes, implement DAO