clean up code, generate equation display
merge conflict resolved