Refactor CPU module