Tiny prune: removed some of the redundant code. TODO: Further prune, by creating a utility ouput object.