Rework OsManager, needs to get tested on all platforms, except x64