Clean up dependencies build script
Properly handle message replies coming back in a different order