Remove pre-2.6 compatibility, move imports around
Convert lxml imports to relative