tracking referral status  - added referral template save functionality, fixed several issues with referral editing