added metadata to kb-if
added optional info map to metadata
metadata is not just a map but a structured object