Port main and initialization of mud parameters.