Finished off logic for searching and building of view models.