Started logging system. Split up some of the code into header and footer. Check.php is now a "command line" example. Still a lot of work to be done.