Trying to use the state pattern.
Commit