Replace usage of monkey patches with modules