Refactored code to meet most of CodeSniff and phpmd standards refs #2489