r1803 + move assertion functions to where they are mostly used (ophandlers.php)