Strip whitespace around search terms (fixes #50)
Abstract some stuff, make some helpful methods for getting runs