Fixed iOS issues

Attempt at resolving the majority of iOS issues and other bugs.