Working on errors and fixed principles

Signed-off-by: Nick Brook <nick@rmpenterprise.co.uk>