Made the data structures more bson friendly, it appears to inherit json metadata when possible