Removing old query parser, introducing $mode in query parser