fixed broken links in activity; added before_destroy in studysessions