Shape refactoring mostly done