still more code cleanup