Moved unnecessary logic from controller.
Merge remote-tracking branch 'origin/master'