Activity refactoring

Repository fix