fixed media.php

Fixed media.php -- will continue to remove unneeded functions and simplify the platform.