Got planet generator working correctly. Needs lots of tuning though.