Now autodetecting http port works + removed duplicate shutdown-clean-code