Added validation and more search stuff