Improve GetData() func & fix x/y bug in GenSphere

Also reorganize methods & convert tabs to spaces for consistency