cleanup js main