PEP8 and Pylint clean up

Removes some unused imports (and the dependency on markdown), plus adds some newlines where PEP8 dictates them.