Pull in updates from petertodd/master