Refactoring. Sample_management_activity changes