Added "graph resilience" and rewritten to satisfy stupid pylint.