Cleanup and proper use of path.join