Added polymorphic object class
Improved documentation and testing