refactor js page https://app.asana.com/0/15857617978604/15843277689907