fixed formatting and eliminated dangerous construct.
fixed RGBA readout when render widget is zoomed in and cleaned up code.