Moved few function to runtime/platform