made it more readable? and and fixed some glitches