Improved the IMT management by leveraging the new functionality in hazardlib