Since the logic is identical and only difference it the types, it would be nice to have a common module across Mac/Win for this. It's already duplicated from the JS code, so now there are 3 copies. With Linux there will be 4 :(