more code reorganization.