Edited out some stuff, now compatible with Xcode.