Added support for casting objects to allow one to access a parent classes methods.