moved ui js to external file
save settings using cookies