this contains various fixes and improvements
requested review from @dan
added 1 commit
Compare with previous version
merged
mentioned in commit 5fed86a4