Add mobile optimizations

Some minor changes for better support on iOS devices and mobile devices in general.