Added type signatures. Removed (lookupBsonVal).