More work on media files refactor.