refactored media controller, extended tests