A bunch of cleanup (= Fixes #139