Separated server code into module.