Cleaned up the EntityController trait.