Better configuration routine