Massive refactoring
Added entity type enum (oh god...)