Improved speed of examples and changed notrun to dontrun
Fixed problem with mgcv