Refactored to a flat variable scheme so that overriding defaults is easier