Idiomatic changes, README change.

Just a bunch of small changes to make the code more idiomatic or clear. Also added a list of patterns to the README. I didn't get to everything yet, I might come back later. I tested every change and the output is all the same.