Fix compiler warning (and minor cleanup).