Output stack refactor