Improved scheleton for search flow.