Fix broken OS X build compatibility
Add missing comments