Finish testbed code