Separated-out js, updated html