Add includes support for Casper integration

Also clean up code in casper runner.