fix a number of code smells, as well as a few legit bugs.

the pylintrc file definitely could use some tweaking.
we could/should also add a numpy plugin to pylint-brain, and use that.