Incorporate @lspector's suggestions, particularly in which namespaces to import.