slight refactor of 'importer' to allow usage external to HTMLImports