Revert "Revert "Merge pull request #77 from j883376/cleanups""

This reverts commit d25205d9d381dc83d610fa1084019b90cfe83e1c.
Fix Database::GetZoneID()
Merge pull request #78 from j883376/cleanups

Code cleanups, take two