Emailer cleanup

- Controller: Add_module_js() should only be called in the constructor
- Library: Removed use of db->query in favor of db->update