add -server to jvm-opts
Add shutdown-agents and get rid of variables to avoid holding onto head