reorganized JS classes