Some refactoring...  New logic for machine search page.