Added clearErrors feature to environment and errorlist
Merge branch 'master' into martyn82