Changed to {{curly}} replacements from $$dollar replacements.  Added replacement tests and refactoring testing a little.