Fixed an issue with attached cell-events.

The ``this`` object no longer referenced the correct object.
Templated emails.
Merge branch 'email-templates' into develop
Removed unused web routes.
Code cleanup.