Refactor search methods into Repository

They have been removed from the Manager and Runner.
Tests have been added for both search methods in the process.