comments and changes on latest from varoquaux branch
Integrating part of cameron's changes