lot of works, fix remote-package loading and add some tests