2nd edition

Cleanup code added
CocoaDialog used