Fixed problems in CPU. Added test files.