Revert "Remove concept of dependencies and keep queue serial"

This reverts commit d7e0fb1d54e7acb194f02854bceeae1f9ae79531.