Moving to templates... almost finished.