Modularization & cleanup.