Program class with memory pool and object factory