Moved position of changing flag in code.
Formatting.
Couldn't figure out a good way to revert to a previous commit, so I had to copy paste the previous commit into this commit.