further updates to modal code

revising var / function names
convert <template> to <script type="text/template">
Update close button mark-up and css