Refactored QueryParser and QueryValidator #7