simplified Codec writing
added mgo/bson codec