-lots of cleanup on the instance/definition paradigm
-added some deep weird stuff for the editor