Wrote tests for rewritten code.