Sort set statements.
 Clean and sort mappings.