debug prints tidied up, other minor fixes; go ./... succeeds