(hopefully) completed conversion to new factory pattern for container classes