Minor cleanup

I'm in the process of doing some larger refactoring (you can check out the major-refactor branch in my fork), but in the meantime I figured I'd try to push these upstream.