Update

Rearranged JS. Removed unnecessary parts