Refactor Memeory Pool.