Added memory pool and tests