Implement code to support ordering by type of import