Updates to master

Many updates to master see commits for details.