Move business logic to models