refactor: cleanup task function(s) handling code