Some changes per @alexcrichton