Tweak tests, improve API