Now using a list of imports
Adds first-import detection