Refactor, refactor the shiny code