correct cocoa macro
update documentation
code cleanup