Small code reorganization.