Added and refined tests.