Pulling in changes from dfm’s fork