Rearranging things to work for iOS