A bit of refactoring to make async tasks a bit more lean