Adding pool support works. After this commit I will begin working on size reduction.