Made utility functions so that waiting on messages is easier.
Cleaned up tests, but still could be better.