Prepared the index page for customisation

Code was cleaned up, commented in some cases moved to more appropriate
areas. The code was also checked using validator.w3.org for any HTML 5
errors.

Only one warning was shown which was simply a warning that the
validator was in beta for HTML 5.