Changed few things about test function.