Changes that reduce the amount of memory allocation. Moved some files
around for the C++ layout.