Add path ahead of others. Better support for packages. Fixed tests