Code refactor

Splitting up the Search module into smaller sub-modules.