Adjustments and automatization in main