refactors helper methods and adds contentMetadata display test