Refactor index.php to remove need for abstract and concrete factories