Implemented search, minor bug fixes