Merge of PR 2744, 2758, 2759, 2760 and 2761

This batches pull requests #2744, #2758, #2759, #2760 and #2761 together.
There was merge conflict with one of them - I only have the power to merge entire pull requests so I packaged them all up as one with the conflict resolved.