Converted some methods to templates