Moved templating code into separate file, preserve selection for shadow fields, defined inputText Handlebars helper, test files