Changed server.R to do the modeling directly on the server