Directory and scripts optimizations