Check-in before more code harvesting.
More updates, broke output a bit though.