Made C++ constructors more intelligent, added better safety checks at construction and insertion, and switched Python to use new-style classes