Implemented better support for meta-data

Converts meta-data values to correct types and converts string resource identifiers in to resource IDs. Fixes issues #917 and #931