[WIP] Media api refactor

Closes #105