Final Version with everything work on Mac