moved lots of deps into dev-deps
better shutdown after errors