Leave module related improvements

Follow