Cleanup
Make  monadic to allow code generation while collecting arguments