A bit more code cleanup