Add error checking back in, move some batch stuff out to indexlaws.php
Add error checking back in, move some batch stuff out to indexlaws.php