Change dynamo schema and refactored.