Simplified task logic with closures