Re-structure packages and use cached distance matrix
Clean up the mess with duplicate files