Added bag.
Refactored code.
Fixed case of three twos.