Minimised initialization code in main function. More modular design…