Refactored way in which results are built