Replace deprecated Carbon APIs with Cocoa. Includes code by: Simone Karin Lehmann Michael Natterer Daniel Sabo