Major module cleanup