search enhancements and cleaning up some stuff