some js cleaning and comment adding