reordering binary op to display operation in beginning of list, similar to lis.py
cleaning
JSON return to front end. Must format for D3.js tree