add tests for pagerank algorithm
cleaned up code and added comments for docco
using should for testing rather than assert
merge