C++ified the type checking
Added new files