Tidy up function formatting