Some fixes and insert also test for the mediafile app.