Added OS X support
Fixed definition reference
Updated iOS example to match current file names
Code cleanup
Ported example to OS X