normalize code in preparation to module changes