Improved indexing of objects and added serializer/deserializer functions to the index. Claned up MetaDocument class.