Separate xml macros from settings
Add the same flexibility just added to macros to image overrides
PEP8