Formatting changes

Changed formatting and removed loop condition from second loop