spelling correction
tweaks to debug printing
documentation for loops
finding functions, some of which made it into std