Html creation and some minor changes to script.