Added replaceAllMedia

And tested this time -.- also uploaded the new test.