Now uses .cpp files, almost completed pcode rewrite