Fix #12 (Add memory pool)

Correct templates