added debugging to javascript output
merging debug into master