Merge changes from mmzeeman master

Merged changes from @mmzeeman. Please review and test. Once this is merged we can proceed with the stats merge.