Remove bad code from xmllegacy. Add var->code tag mapping (hack)