Reorganized JS