WIP: fixes dependent functions, about to refactor

* Fixes use of dependent functions from within service graph
* Adds placeholder tests
* About to refactor to introduce service defrecord
WIP: refactoring