fix broken tests, refactor Graph class, enhance docs
add licence to docs