Added Templates support