[WIP] Media api refactor