Tabs->spaces, remove dead code.
Add running instance helper.