Refactored query process. Added toString method for DisplayMode.