Added if statement to smooth SCR output.

Also minor formatting changes.