Correcting for failed tests

Some tests failed in the previous build, mostly due to syntactic
errors. Also restored a section of code in translateMediaIndex whose
absence made a test fail.