MUCH better coordinate generation that actually works.