Move this to be with the rest of the non-platform specific code