Simpler dir code