Media Param Fixes - Rebased

This PR is a re-submission of #66 but based on a more recent master. The test is currently failing due to Issue #111.