cleanup trial design code and remove debugging print statements