Moved some functions into kern/testing