Added in iOS system stuff and fixed a few small errors