cleanup some module defn functions