Moved test harness code from Cakefile to flip library