Re-organise stylesheets, add  function