create module class avoid going fat Controller.
init function created.
Merge pull request #2 from lianca/dev-api

create module class avoid going fat Controller.