forgot to commit and too lazy to split it. Lot's of changes
Big commit, Added a Server and Client class and cleaned up main.
Deleted some weird old state code from the past