Mind's Desire

I've been working hard at getting Mind's Desire to work, but there's still a few problems:
1. The AI can't use it.
2. Any spell copied to Mind's Desire can be activated as an instant, thus you can cast creature or sorcery spells as instants
3. You can pay alternative costs (such as morph) but the card errata says that you're not allowed to. I also tested it with recall and it seems that X is infinite (but restricted to your hand size due to recall's coding). The errata says that X must be equal to 0.
I've committed my version of Mind's Desire, so have a look and see if you can point out any problems or give any guidance.
1. The AI can't use it.
2. Any spell copied to Mind's Desire can be activated as an instant, thus you can cast creature or sorcery spells as instants
3. You can pay alternative costs (such as morph) but the card errata says that you're not allowed to. I also tested it with recall and it seems that X is infinite (but restricted to your hand size due to recall's coding). The errata says that X must be equal to 0.
I've committed my version of Mind's Desire, so have a look and see if you can point out any problems or give any guidance.