Set cleanup - add gcc4 visiblity rules
commented all code
some additional error handling issues
fixed C++ comments