added code format/style test and fixed up code

I converted all instances of `'''` to `"""` because PEP267 uses the double-quotes.

I also moved the param types into the `:param <type> <name>:` format.

Fix PEP8 things in a few places.