avoid ambiguous else: always use braces
semantic bug fix: « ! a == b » is is fact « (!a) == b », which is not the same as « a != b »
malloc/calloc/free is evil. C++ brings *typed* allocation functions and smart pointers, use them!
FIXME: do not expose the internals of classes, especially when these are (non-smart) pointers!