-masssive refactor and more network implementation