Improve save test UI

Also split the HTML from the JS code