some cleanup.  additional work towards multiple item checkout
try different pattern for database module.  explicitly export public functions all at once