Large refactoring - change dirs and index