beginning media api tidy