media chooser and some cleanups