Added even more logic to the virtual network manager and fixed bugs