Simplify template

Instead of doing a lot of if checks for type, just use the type directly, as its already in the format we need.