saged: fix up some coding errors
sage: minor js reformatting