Add search bar and fix more bugs