Template fixes due to some minor db restructure