Fixed Codenarc violation and findbugs violation found in maxScan commit