Injected the entity.query service. Fixed indentations