Refactor Media Search