Add more static C++ code
Change code to use bools instead of ints since we are going to C++