refactor code to remove most code from server.R and place in global.R this includes (unexhaustive list): - moving regex to separate R File