Improve your UI code with Strategy Pattern