changed links configuration to a hash (less awkward)
added a missing closing tag and added a '0 emails' message