re-structuring code according to new XML structure, working till compression module