Network OS extension and some code cleanups