refactored out Database and GUID