Added basic search functionality to messages