Some refactoring/cleanup

A couple of simple cleanups to familiarize myself with the code before doing something useful.