Networking/cleaning up

Should be ready to test now.