refactor RESTemplate into template.js
RESTemplates.load(templateName, callback) fires callback when template is loaded

refactored RESTemplates for readability and asynchronous operation
refactor modules.commandLine.commandLineWidget into templates