Re-organized files, split into config, logic and output (index.php). Test files all in subdirectory "test".