Code re-organization to improve modularity.