Cleaned more code from the server logic