Replace tabs with spaces
Some trivial, pedantic PEP-8 and whitespace/line length cleanup with a few other minor code tweaks where I was able to make obvious simplifications.
Some TODO comments as reminders for changes I might like to make later, time-permitting.