Currently, intermediate output is handled in a large data structure, should move this into a class for better readability.