Split worker and promise out of graph code
Small Bugfixes