Added handling for aliases and imports in resolution.