Tweaking of search patterns.
Also cleaned up the returns from the controller.