included browser testing and refractored js