made coding style more uniform, integrated new server and client code, add APPLE ifndef for draw stuff