minor improvements; added function to get current matching query to Media.js