I would put all this stuff in the init function of whatever the container class is.