Added Darwin detection and parameter handling.