General test formatting and cleanup.