initial leg module cleanup