Corrected some patterns with autopep8 (cpulocal and main) and some minor syntax issues