added url to the emails
refactored _lib to make them more aligned with the controllers and models they support