Add documentation and comments on Database class