iOS Motion manager code cleanup