Entity handling, tree drawing, enum cleanup