Added prototype of entity editing. For now quite ugly code, refactoring needed!