Misc refactoring, method to search for a best seed