Split the business logic out into AMD modules