Various improvements, mainly support to pass file descriptors