Improved functionality for different actions.