Move business logic into handlers