Removed some whitespace
Added position saving two places where it was missed
Made the code easier to read