Refactored directed graph specs