Implemented persistent outputs for sequential function calls.
Simplified test1 and added test2 for testing multiple inputs and outputs.