move selftest()s to testfiles