More functions converted to use database, Vault repo added rather than included lib