Add expire call, refactor server