fix massive JS bug
minor layout goodies
improve pause
add position_in_run to data
json encode remove legacy function, maybe this is the reason I can't get JSON in JSON to work