cleanup + better testing for libk to amdts