docs updated, code updated to be backwards compatible with gcc 4.4