Search improvements and minor changes. fixed#5