Checkpoint for new js stuff.
Checkpoint
more js
Maybe this is better
Nothing works but this shows more promise.
Fix sort
Fix logging.
Not sure what this code was supposed to do.
This is not very nice. Try to avoid giving a 3 to member expressions
that sit on an if.

E.g.

var a = {};
if (a.b) {
}

The a in the if becomes a reference because its parent is if. The b is
a member expression so it used to get a 3. We kinda gotta know about
the member expression's parent to determine.
Some more work.