Cleanups addressing Jason's review comments

* globals should be marked as 'global'
* Use get_or_create rather than reinventing the wheel
* More sensible string default for single user flag