Refactored Controller

Too gain more performance and  I've refactored the controller. 
Added a modman file
Please have a look.