Use @property decorator for .db
Optparse module support for tests