Refactored BsonObjectId and added tests.