Refactor @loris trigger_async function and add tests

@leggetter This isn't good to merge until I give the thumbs up