Update functions.R

Added in glmnet functionality and fixed the issues with one model (hopefully correctly this time :)