Some more additions on the state pattern.