Imported from https://github.com/fra31/mmr-universal