Implemented Search and a lot of fixes