Getting rid of switch, implementing elegance