factored the container bits out into a dedicated container class