initial stab for logging
mass rejigging and move

It now runs correctly under sphinx, locally, and generates an output.
Will need to improve it soon.