Clean up render_flash, write spec.