Mode fixes

Factor get mode into own function, so can be made early to make the
database talbe. Some typos.
Fix bug in geo catch change
Typos in use of mode
Typos