Bugfix release for 1.9, also major cleanup