Ugh, the type system in C++ is bad. It's hard to fit these things together. I'll have a ton of cleanup to do when done.