Code for running app on server. Other changes