Fix dir layout and configuration.