path.join and code styling fixes