Tidy ups and metadata.xml QA check