Moved core logic.Created utility Query class