Clean up.
Call quit directly when signal received.
Cosmetic fixes.
Return correct capabilities even in test mode.