Refactor and add braintree npm package