Added missing external references
Use full qualified path
Added termination hint
Refactoring of AOT handling