Removed Search Bar From Main and Fixed Bugs

Added the search bar instead in each individual page, fixed the bugs and
cleaned the code in the end.