Better handle directories and initialization.