Cleaned up the DatabaseDocument class