wip
OS specific functions separated in driver.