Add decent option parsing and version
Add file header; tweak comments
Handle INT and TERM signals gracefully; use new dummy shutdown method