Abstract the code a bit by using functions
Rename code for clarity
Copy logfiles, cleanup
auto_build: More tweaks