fixed some consistency problems (email vs. emailAddress)
added an attribution to the error handling code which was taken from octopus deploy / paul stovell. Sorry Paul!