Minor code re-organization.