Clean up common code between defn and defs