Get advanced output working
Fix min-max stage