Token replacement implemented and working server-side