break ios.js up into logically related files