Removed unused imports
Introduced TypedObject to remove the need for casting
cleanup
cleanup