Move the await function to utils.

Make the function more generic and place it in utils
and then use it in the job await function.
Check who is being connected to and ensure > 0 connectors.

Ensure that we connect from some input to some node that provides
said input (not itself).
Merge pull request #17 from harlowja/small-cleanups

Small cleanups