Media Server tests suite and several fixes