Updated with some tests.