Configurable custom queries. Closes #123