code cleanup (cpu.c)