optimize code, create model-view-controller architecture using Utility class as the controller