fixing subclassing and from_db
Clean build environment, added undef support, cleaned up related warnings, and added subclass support.  Ready for 1.0