Added trimming of slashes/whitespace to query builder.