Formatting, fixing algorithms