OK code cleanup