Implemented container functionality of bags.