yet more code cleanup