Refactor outputs and clocks
Add tests for multiple processes