Implements changes detailed in  #333