added a few comments
Added MacOS support