Reformatting and updating
Introducing switch statements