refactored code not to use ITask objects directly and fix to XBEL parser