more attempts to clean up the code to work better on NFS : seems ok now, but expect more "bug" fixes to come (and more cleanup as the code is a bit hacky)