Added RefTypes support
fixed issues with previous wallet tasks