whitespace and cosmetic changes, renamed a field.
fixed event handling so that all 3 widgets (2 inputs 1 graph) work together.