simpler casper error handling in tests
code reformat
updated doclink