scrutenizer duplication is a little to sensitive
fixed some code quality issues, $object is no longer FALSE when in error