Tests rewritten.