Some reordering and formatting