Better parsing of imports