refactored GLM code to put runs in object arrays. Added bootstrapping and parameter selection by crossvalidation