Fix a bunch of tiny bugs and pylint warnings

While pylint still has a ton of spew about missing docstrings, this is a
decent improvement.

Signed-off-by: Kyle Moffett <kyle@moffetthome.net>