A bit of cleanup and polish with output and variable names