Refactor application server.