Code cleanup before moving to phone