Initial version of selftest