Some more work. JS scopes are so fucked up.
More work on parsing