JS added.Repaires some bugs