WIP! More Piper code

This is under some fairly heavy development so I don't promise everything is coherent.
We can fix errors from the past :-):

```
log_path = os.path.join(CONFIG['log_dir'], log_file)
```