more code cleanup