Move the templates out of .js and use Handlebars
Correctly detect a finished state also when there is not feedback