Vault functionality

Add vault functionality to stable branch.