add improved javascript indenting and syntax