Moving x-y-coordinates to render code