Merging Pavin's code from 20141206.1100

Pavin emailed me some code to add to source control