Some work on making a more flexible pool api