add search functionality and other minor fixes