Removes extra closing div.

Update spacing and indentation to better see when the ifs and whiles all get
ended.