Cleaned up search page code.