Refactor Base64 methods.