Tidy-ups and fixes for Mandrill