Fix testing and add static func definitions where appropriate

Also:
* make code inside DFS less arrowized
* remove graphInit use