Refactored the Import-related classes and parsing rules to increase type-safety-ish-ness and enhance parsing-time error management.