Cleanup of index.php and error checking for Programmer Buttons