Modularized re-factor.