Fixed bug where pool did not work for types with non-trival constructors
Added some tests