Adding controller base stuffs into JAF
More refactoring into controller.