New code for shiny; tidy-up of files