Refactoring

Refactored the code to make it easier to add new functionality such as
more search terms. This includes a factory for creating "handlers".
Whenever you want to add new search terms you only have to add a new
"handler" and add a bit of code in the factory function.