More iOS fixes and cleanup.