CR updates

replaced H
moved internal errors into function.

Signed-off-by: Simon Kirkby <tigger@interthingy.com>