[WIP] Add custom template support