Sort out formatting