Improved os abstraction layer