Move template to be built-in
Shutdown on interrupt signal
Handle shutdown command

closes #3