Thanks to Teamscale: Removed stupid duplication (of almost 100%)
Additionally removed the unneccesary generation of temporary files