move Container and Image initialization code into base class, and adding methods for model attributes.