Better public JS structure