fixed minor html generation errors causing small formatting issues and the P(A)(%) and P(B)(%) to not update in real time