Separated the interface from the implementation

It allows to add operating system specific back-end.