refactor amanda client