Refactoring in Amazon wrapper.