> this is mostly reformatting old code for style

Perhaps we can improve it (or at least iron out a possible bug) at the same time? ;-)