update mark to use database; photo fully migrated, modifications to templates to be more generalized