Port logging, platform-specific utilities, path setup, and partial multilingual support.
Also handle cleanup more sanely.