reformatted and clean up html and scripts