What if there is no magic? Wizards are just descendants of a high tech civilization that have forgotten their past. What everyone thinks is magic is controlled by computer, maybe through nanites or something similar. Something like a holodeck could account for a lot as well.