FIX missing library 'lxml' and rewrite a piece of code to be python 2.6 compliant