Reorg

Minor refactoring, in addition to the cout "bugfix"