Did some further cleanup, and fixed the build.