Net stack refactoring

Just move things into separate files and comment a little