Add changes on client and refactor server-side.