Add update sample collection action and refactoring