Moved search helpers into search