Various bits of cleanup