Fix minor metridoc-rid bugs and apply updates from master