Reworked imports checking