Moved all code to index.php

All code in index.php until I've got this base template perfect, then
will break out into separate files.