stripped out unnecessary elements and generally tidied things up