Jh output

Just for code review.
Unfortunately big whitespace diffs, very bad for review.