Consolidation/organization of JS