Adding the initial Qi version (sent by e-mail)
Ofer's various first changes