Solved tag issue; reformatted code