Make partial/extend work ans add tests.