Adopt modifications from Nick