Adds ability to select per-query prefixes. Fixes #3