Refactored Abstract Raw Controller

Abstracted the xml templates