Massive commit. Almost completely rewriting the server

Not much works as of now in the server, committing because I want the
stuff saved incase of a hdd failure or something...