Performance optimizations and extra tools from CMSDAS

Several code optimizations (all turned on by default).
https://www.dropbox.com/s/hq1r14s5ih7h9yl/gp-optimizationsDAS13-121113.pdf
Needs some validation before it can be pushed to the master branch