Add search options and remove one bug with searching

Sorry for sending so many pull requests!