Finished off search functionality and removed code duplication.