Final version with DEBUG comments still on. Need a last revision from Varun or Neil