Updated formats method and supporting functions.