Refactoring of Controllers. Some general clean up of code base.