Fixed lots of compile errors.

I feel like a prereq for merging into master is that the code should not have any compile errors...