Cleanup and improvements to CPController
Merge pull request #237 from VladimirTechMan/cleanup_in_cpcontroller_2nd_version

Cleanup and improvements to CPController (2nd version)