OSX SystemTrayIcon fix.
TimeSliceThread timing fix.
Minor tidying-up.