Reimplemented server logic using manual custom.