fix markup
move settings to modal and improve scripts