Refactor Config and Template Classes

To make it easier to create a consistent API the Template and Config classes need to be refactored and properly doc stringed.