MacOS Compatibility

Hey buddy,

Few days back Carlos showed this to me and I found it cool, so I made it compatible with Mac. 

Please check it again and if you find it cool merge it :) ...

Cheers,
Omid.