Added generic object pool implementation