Rename variables/types, clean things up a wee bit