More housekeeping and <dir> setup.