Greatly simplify monkeypatching code for radicale