Reorganize JS