Added partial entity support

Partially added entdef support, but cannot add entities from editor yet.
Next commit is adding entdefs to xml file from editor.