Cleaning up the code, code comments and cyclomatic complexity according to code sniffer