Minor refactoring; added beginnings of CloudFormation template.