Refactor the result module so it can be shared throughout different search strategies