Template fixes for ca classes. Working.