Reworked RTTI stuff, but needs more work on automation.