Working directory tracking. Refactoring.