Implement restart. Now the results looks correct.

TODO:
- test on larger data set (provided on the site).
- implement tracing.
- comments including input/output.
- get rid of igraph library (?).
- prevent re-calculation in some functions (no priority).
- doing part 2 of the assignment.