Implemented better support for meta-data.

Closes #942, #917, #931.