Refactoring code to reflect AWS deploy structure