Pep 8 fixes, made it compile.
Improved plotting.
Bugfix.