Improve css and js functions