Refactoring.  Move common functionality to glmnet.