Added media index types, bug fixes