Remove unused imports.
Add lightning-while-capturing configuration option (fixes #29).