Update message regex
Move async helper to a separate file
Remove duplication in tests