fixes #1646, #3103 - enable cloning for templates, and add read-only options

I can't think of a proper name for ```locker```, ```lock_helper``` perhaps? Tests pass for the above method extraction.