old ios code cleanup