Fixed call to RequestCode

Also added TrimNumber method and exception printing in CliRegisterCode
Fixes #4