More or less modernized the code.