Fixing compilation errors. Still need to review the code because of the latest changes to the IDM design.