Media rewrite

Rewrite of media helper to enforce order of teardown and setup and allow async.