JS repos and fixes

CHANGE:
- Position of some script includes

FIX:
- Wrong TS constants

ADD:
- Some comments
Added and changed comments