Added basic networking, Fixed several errors