Combined code responsible for design matrices and regression.