Finished the HandleOutputs procedure