splitting out the js pieces