Simplifying and optimizing the bowdb searching.