Misc malawi

a number of features and fixes. commit-by-commit for details