Refactored helper functions for handling void tasks