one fix for mistake in prev commit and a fair bit of tidy -- working nicely now with v211!