Minor refactor of metadata and media queries