Modernized code.

Down to two deprecated (but working) calls to Gestalt.