Dynamic actions for list items and Refactoring