Detect and auto-select single item rows. Fixes #23

Also minor refactoring to attempt reducing likelihood of #22. Unsuccessfully