Clean-up & re-indent source code
Add source code comments
Realize masking in terms of the basic template type
Fix hyphenation in comment
Merge branch 'master' into remove-simultaneity