Code cleanups, take two