More refactoring.
Preparing network and os stack API's
Cleaned up header files