cleaned up comments
cleaned code
brought the QueryRewriter interface in line with the use