Added definition builder for upcaster chain
Refactored definition builders
Updated documentation