Fixed a logical flaw with pointer shifting. Renamed things.