Merging ICWE code from CELAR branch.