Moved business logic to Model