Merge with PencilCode master

This commit merges with the current state of PencilCode:master.

I first pulled a copy of jamessynge:template into PencilCode:template to do the merge.

This pull request is to pull it back to jamessynge:template.