Fixed issues and added s3