Adding server stuff
bug fixes