Hopefully fixed the Apple compiler issues (I do not have an Apple compiler)
Added some comments to code and change log