Small cleanup
Remove stale import
Fix UI bug introduced in refactoring
Style cleanups
Hopefully make closing streams a bit more robust