desktop cleanups and initial iOS port