start mac code
minor changes
Merge pull request #1 from johberger/master

add mac support