reformat a few functions for readability.