changed media to has many through

Fixes #145
Where are the tests for this?