Moved searching and sorting into their own modules.
Merged latest master