Lots of cleanup and started on networking