Implement the changes requested in the last pull request (indentation, refactoring, rework conditions, use cdn, add a modal confirm dialog when adding an activity...)