Updated to use dynamo for persistence