Erasing all of the code and rearranged things a bit.
minor changes