adding radio support

Adding radio support and extracting template in the main HTML instead
the JavaScript.