Implemented shutdown sequence and hooks
Merge pull request #8 from bender-bot/shutdown

Shutdown