more javascript refactoring
vault functionality working