Rename template to allow easier metaprogramming
Use metaprogramming to DRY three similar methods