Update token to use vault and add some tests