Debugged refactored stouting -- now identical to previous implementation again.