Fix most deprecation warnings and remove hacky nohup code