added result/error constants, use constants where possible, determine type from destination address and switched to enum, added isErrorResult and remove error description from result
Merge branch 'john30-master'