Close things when we're done with them
Move flag vars into main

They were shadowing start params, which is mildly confusing.
Reduce width a bit