Some changes to classes. Need to fix templates.