Finish up rework and add support for file descriptors.

Tested on one of the more complex log files, nothing more yet !