Consistently use directory (not folder) and a few other updates.