Enhancement/294/metadata refactor



<!---
@huboard:{"order":220.6015625,"milestone_order":310,"custom_state":""}
-->

This was fixed in another branch that hasn't been pushed, was causing the integration tests to fail