code cleanup
now works on OSX
Merge pull request #1 from hobgreenson/macosxbuild_dev

Macosxbuild dev