Added missing container operations to Document class and wrote more tests to cover new and existing functionality.