Make educated guess about workdir etc
Reformat