code tidied and pages made consistent