Remove media queries

This pull request is bigger than I'd like, but we need to revive this work if we are gonna get rid of media asset queries.

This gets us pretty close to removing them.