Slight adjustments for search and messageType