A bunch of cleanup, tweaking and fixing. Started work on networking.